/*
* 路由对象模块
* */
import Vue from 'vue'
import VueRouter from 'vue-router'

import homePage from '../pages/home/home.nvue'
import checkPage from '../pages/home/check/check.vue'

//申明使用插件
Vue.use(VueRouter)

const router =  new VueRouter({
	mode:'history',
  routes:[
    {
      path:'/',
	  component:homePage,
      meta: {
        showFooter: true
      }
	  },
	  {
	    path:'/pages/home/check/check',
	    component:checkPage,
	    meta: {
	      showFooter: true
	    }
	    }
  ]
})

router.beforeEach((to,from,next)=>{
	console.log('this works')
	next();
})

router.afterEach((to,from,next)=>{
	console.log('this works!')
})

export default router;